<template>
  <div class="home_box">
    <van-search v-model="value" placeholder="搜索福利" input-align="center" show-action @search="onSearch">
      <template #action>
        <van-button type="primary" round size="small" @click="onClickButton">筛选</van-button>
      </template>
    </van-search>
    <WelfareCard :list="welfareInfo.list" />
    <Tabbar />
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import WelfareCard from '@/components/layout/WelfareCard.vue'
import { showToast } from 'vant'
import { welfareInfo } from '@/config/welfareInfo'


// const t = () => {
//   const text = '加载中'
//   const obj = Loading.show(text)
//   setTimeout(() => {
//     obj.message = '加载完毕'
//   }, 2000)
//   setTimeout(() => {
//     Loading.hide()
//   }, 3000)
// }
const value = ref('')
const onSearch = (val) => showToast(val)
const onClickButton = () => {
  if (value.value == '') {
    showToast('请输入筛选条件')
  }
  else {
    showToast(value.value)
  }
}
</script>



<style>
/* User information section */
</style>
